<template>
  <div class="box">
    <div class="box_main">
      <div class="box_nav">
        <div class="box_nav_img overflowEllipsis">
          <img v-if="details.faceUrl" :src="details.faceUrl" alt="">
          <div v-else class="overflowEllipsis">{{details.name}}</div>
        </div>
        <div class="box_nav_name overflowEllipsis">
          {{details.name}}<i class="icon iconfont icon-unie609"></i>
        </div>
        <div class="box_nav_txt overflowEllipsis">求职意向：{{details.careerObjective}}</div>
        <div class="box_nav_list">
          <div class="box_nav_item">
            <div class="box_nav_item_t">
              {{details.age}}
            </div>
            <div class="box_nav_item_b">
              年龄
            </div>
          </div>
          <div class="box_nav_item">
            <div class="box_nav_item_t">
              {{details.expectedSalary}}
            </div>
            <div class="box_nav_item_b">
              期望薪资
            </div>
          </div>
          <div class="box_nav_item">
            <div class="box_nav_item_t">
              {{details.workYear}}
            </div>
            <div class="box_nav_item_b">
              工作年限
            </div>
          </div>
        </div>
      </div>
      <div class="box_message">
        <div class="box_mes_title">
          基本信息
        </div>
        <div class="box_message_bd">
          <div class="box_message_bd_item">
            <div class="box_message_bd_item_lf">学历：</div>
            <div class="box_message_bd_item_lr overflowEllipsis">{{details.education | educationFir}}</div>
          </div>
          <div class="box_message_bd_item">
            <div class="box_message_bd_item_lf">出生日期：</div>
            <div class="box_message_bd_item_lr overflowEllipsis">{{details.idCard}}</div>
          </div>
          <div class="box_message_bd_item">
            <div class="box_message_bd_item_lf">所在地区：</div>
            <div class="box_message_bd_item_lr overflowEllipsis">{{details.area}}</div>
          </div>
          <div class="box_message_bd_item">
            <div class="box_message_bd_item_lf">联系电话：</div>
            <div class="box_message_bd_item_lr overflowEllipsis">{{details.mobile}}</div>
          </div>
        </div>
      </div>
      <div class="box_jl">
        <div class="box_mes_title">
          工作经历
        </div>
        <div class="box_jl_BD" v-html="details.workExperience">

        </div>
      </div>
      <div class="box_hsbq">
        <div class="box_mes_title">
          技能标签
        </div>
        <div class="box_hsbq_bd">
          <span class="box_jn_main_item" v-for="(e,i) in jnList" :key="i">
            {{ e }}
          </span>
        </div>
      </div>
    </div>
    <div class="box_but flexVam">
      <div class="bt_vt flexVam">
        电话沟通
      </div>
    </div>
  </div>
</template>
<script>
import taskApi from "../../requestApi/taskApi";
import { Toast } from "mint-ui";
export default {
  components: {},
  data() {
    return {
      jnList: [],
      yserList: [{}, {}],
      details: {}
    };
  },
  created: function() {},
  mounted() {
    let self = this;
    self.baseUserMessageDistributeFun();
    window.getAppgetUserToken = function(val) {
      self.baseUserInfoFun(val);
      self.listFun();
    };
    this.titleFun({
      title: "求职信息"
    });
  },
  methods: {
    async listFun() {
      let self = this;
      let params = {
        id: this.$route.query.id
      };
      let res = await taskApi.GetApijobhuntinguserinfo(params);
      if (res.statusCode == 200) {
        self.details = {
          ...res.data
        };
        self.jnList.push(res.data.skillTag);
      } else {
        Toast({
          message: res.statusMessage,
          position: "bottom"
        });
      }
    }
  },
  filters: {
    educationFir(val) {
      let arr = [
        {
          label: "本科",
          value: "1"
        },
        {
          label: "大专",
          value: "2"
        },
        {
          label: "中专/技校",
          value: "3"
        },
        {
          label: "高中",
          value: "4"
        }
      ];
      let str = "";
      arr.forEach(e => {
        if (e.value == val) {
          str = e.label;
        }
      });
      return str;
    }
  },
  watch: {},
  computed: {}
};
</script>
<style scoped>
.box_hsbq_bd {
  display: flex;
  flex-wrap: wrap;
  padding-top: 0.5333rem;
  padding-bottom: 0.5333rem;
  padding-left: 0.48rem;
}
.box_jn_main_item {
  height: 0.6667rem;
  background: rgba(255, 255, 255, 1);
  border: 0.0267rem solid rgba(235, 235, 235, 0.75);
  border-radius: 0.32rem;
  padding-left: 0.6933rem;
  padding-right: 0.6933rem;
  line-height: 0.6667rem;
  font-size: 0.32rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(102, 102, 102, 1);
  margin-bottom: 0.4rem;
  margin-right: 0.3467rem;
}
.box_hsbq {
  width: 100%;
  overflow: hidden;
  background-color: #fff;
  margin-top: 0.2667rem;
}
.box_jl_BD {
  font-size: 0.3467rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(134, 133, 133, 1);
  padding: 0.4267rem;
  line-height: 0.64rem;
}
.box_jl {
  width: 100%;
  overflow: hidden;
  background-color: #fff;
  margin-top: 0.2667rem;
}
.box_message_bd_item_lf {
  font-size: 0.3733rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(134, 134, 134, 1);
  width: 2.56rem;
  text-align: right;
  height: 0.5867rem;
  line-height: 0.5867rem;
}
.box_message_bd_item_lr {
  font-size: 0.3733rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(51, 51, 51, 1);
  width: calc(100% - 3.4667rem);
  margin-left: 0.4267rem;
  height: 0.5867rem;
  line-height: 0.5867rem;
}
.box_message_bd_item:nth-child(1) {
  margin-top: 0.32rem;
}
.box_message_bd_item {
  height: 0.5867rem;
  line-height: 0.5867rem;
  display: flex;
  margin-top: 0.2667rem;
}

.box_mes_title {
  height: 1.2rem;
  width: 100%;
  border-bottom: 0.0267rem solid rgba(238, 238, 238, 1);
  font-size: 0.4267rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(51, 51, 51, 1);
  line-height: 1.2rem;
  padding-left: 0.72rem;
}
.box_message {
  height: 5.04rem;
  width: 100%;
  overflow: hidden;
  background-color: #fff;
}

.box_nav_item {
  height: 1.3867rem;
  overflow: hidden;
}
.box_nav_item_t {
  font-size: 0.6133rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(245, 245, 245, 1);
  text-align: center;
  height: 0.64rem;
  line-height: 0.64rem;
  margin-bottom: 0.2133rem;
}
.box_nav_item_b {
  font-size: 0.3467rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: #ffa0a0;
  text-align: center;
  height: 0.48rem;
  line-height: 0.4267rem;
  overflow: hidden;
}

.box_nav_list {
  height: 1.3867rem;
  width: 100%;
  margin-top: 0.6667rem;
  display: flex;
  justify-content: space-around;
  overflow: hidden;
}
.box_nav_txt {
  width: 100%;
  padding-left: 0.2667rem;
  padding-right: 0.2667rem;
  font-size: 0.3467rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(255, 151, 151, 1);
  height: 0.4rem;
  line-height: 0.4rem;
  text-align: center;
  overflow: hidden;
  margin-top: 0.3467rem;
}
.box_nav_name i {
  font-size: 0.3467rem;
  color: #fff;
  margin-left: 0.1333rem;
}
.box_nav_name {
  margin-top: 0.2933rem;
  overflow: hidden;
  height: 0.5333rem;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.4267rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(255, 255, 255, 1);
}
.box_nav_img img {
  width: 1.92rem;
  height: 1.92rem;
  border-radius: 50%;
}
.box_nav_img div {
  width: 1.92rem;
  height: 1.92rem;
  border-radius: 50%;
  background-color: #fff;
  color: #000;
  font-size: 0.4267rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.box_nav_img {
  width: 100%;
  height: 1.92rem;
  display: flex;
  justify-content: center;
  margin-top: 0.64rem;
  overflow: hidden;
}
.box_nav {
  height: 6.6667rem;
  width: 100%;
  background: linear-gradient(
    -40deg,
    rgba(222, 42, 46, 1),
    rgba(228, 27, 36, 1)
  );
  overflow: hidden;
}
.bt_vt {
  height: 1.1733rem;
  background: rgba(222, 42, 46, 1);
  border-radius: 0.08rem;
  width: calc(100% - 0.5333rem);
  font-size: 0.4267rem;
  font-family: PingFang-SC-Medium;
  font-weight: 500;
  color: rgba(255, 255, 255, 1);
}
.box_but {
  width: 100%;
  height: 1.8133rem;
  background: rgba(255, 255, 255, 1);
  border: 0.0267rem solid rgba(235, 235, 235, 0.75);
  box-shadow: 0rem -0.0267rem 0.1333rem 0rem rgba(242, 240, 240, 1);
}

.box_main {
  width: calc(100% - 0.5333rem);
  margin-left: 0.2667rem;
  overflow: hidden;
  margin-bottom: 1.3333rem;
  min-height: calc(100vh - 3.2rem);
  background: rgba(245, 245, 245, 1);
}
.box {
  background: rgba(245, 245, 245, 1);
  overflow: hidden;
  width: 100%;
  height: 100vh;
  overflow-y: scroll;
}
</style>
